package car.aistar.service.Impl.xxr;





import car.aistar.dao.AdminDao;
import car.aistar.dao.XXRxiaohsou;
import car.aistar.entity.Admin;
import car.aistar.service.AdminService;
import car.aistar.service.SellerService;
import car.aistar.service.UserDetailService;
import car.aistar.service.XXRxiaoshouService;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

/**
 * @ClassName xiaoshou
 * @Description TODO
 * @Author 肖
 * @Date 2020/10/4 20:06
 * Version 1.0
 **/
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = "classpath:spring/spring-*.xml")
public class admin {

   @Autowired
    private UserDetailService userDetailService;
   @Autowired
   private SellerService sellerService;

   /**
   *@Author 肖相荣
   *@Description //TODO 管理员页面用户表全局搜索测试
   *@Date 15:21 2020/10/7
   *@Param []
   *@return void
   **/
   @Test
    public void testFindAllUser(){
       System.out.println(userDetailService.findAllUser("张"));
   }
    /**
     *@Author 肖相荣
     *@Description //TODO 管理员页面用户表全局搜索分页测试
     *@Date 15:21 2020/10/7
     *@Param []
     *@return void
     **/
    @Test
    public void testfindAllUserPage(){
        System.out.println(userDetailService.findByPageUser("张",1,3));
    }





    /**
     *@Author 肖相荣
     *@Description //TODO 管理员页面销售人员全局搜索测试
     *@Date 15:21 2020/10/7
     *@Param []
     *@return void
     **/
    @Test
    public void testFindAllSeller(){
        System.out.println(sellerService.findAllseller("张"));
    }
    /**
     *@Author 肖相荣
     *@Description //TODO 管理员页面销售人员全局搜索分页测试
     *@Date 15:21 2020/10/7
     *@Param []
     *@return void
     **/
    @Test
    public void testFindAllSellerpage(){
        System.out.println(sellerService.findByPageSeller("",3,3));
    }


    @Test
    public void testqueryByid(){
        System.out.println(sellerService.queryById(12L));
    }
}
